<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>我的项目</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />
    <link rel="stylesheet" type="text/css" href="../../css/project.css" />
</head>
<body>
  <div id="header">
      <div id="back"></div>
      <h3>关注项目</h3>
  </div>
  <div id="all">
    <div class="myProject">
    </div>
  </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/jquery.js"></script>
<script type="text/javascript">
apiready=function(){
  var aid=$api.getStorage('aid');
  //项目经理
    var url='/api/paProject?aid='+aid;
    var functionRet=function(ret){
      var json=ret.list;
      $.each(json, function(commentIndex, comment){
        if(json[commentIndex].isAttention==false){

        }else{
          var templates='<div class="list"><div class="project_company"><div class="left"><img src="'+json[commentIndex].logo+'" class="company_logo"/></div><div class="left"><div class="company_name">'+json[commentIndex].businessName+'</div></div></div><div class="project_name"><span>项目名称：</span><span>'+json[commentIndex].projectName+'</span></div><div class="project_detail"><span>关注时间：</span><span>'+formatDate(json[commentIndex].createTime,'yyyy-MM-dd')+'</span><span>累计时间：</span><span>未知</span></div><div class="tools"><button class="btn btn-info">评价项目</button> <button class="btn btn-defalut">取消关注</button></div></div>';
        }
        $(".myProject").append(templates);
     });
    }
    var functionErr=function(err){
        showProgress();
    }
    //加载项目列表
    get(url,functionRet,functionErr);

}
//jquery
$(function(){
  back();
})
</script>
<script type="text/javascript" src="../../script/main.js"></script>
</html>
